﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="SpiritListByTag.aspx.vb" Inherits="WebApplication1.SpiritListByTag" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<p>
<br />

        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" AllowSorting="True" BackColor="White" 
            BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" style=" margin-left:auto; margin-right:auto;">
            <Columns>
                <asp:BoundField DataField="spiritName" HeaderText="Name" 
                    SortExpression="spiritName" >
                <ControlStyle Font-Bold="False" Font-Italic="False" Font-Strikeout="False" />
                <FooterStyle Font-Bold="True" Font-Italic="True" Font-Size="1.5em" />
                <ItemStyle CssClass="spiritName" />
                </asp:BoundField>
                <asp:BoundField DataField="spiritPrice" HeaderText="Price" 
                    SortExpression="spiritPrice" >
                <ControlStyle Font-Bold="True" Font-Italic="True" />
                <ItemStyle CssClass="spiritPrice" />
                </asp:BoundField>
                <asp:BoundField DataField="percentageAlochol" HeaderText="Percentage Alochol" 
                    SortExpression="percentageAlochol" >
                <ItemStyle CssClass="percentageAlochol" />
                </asp:BoundField>
                
                <asp:HyperLinkField DataNavigateUrlFields="producedIn" 
                    DataNavigateUrlFormatString="https://maps.google.co.uk/maps?q={0}" 
                    DataTextField="producedIn" HeaderText="Produced In" SortExpression="producedIn" >
                <ControlStyle CssClass="producedIn" />
                </asp:HyperLinkField>
                <asp:HyperLinkField DataNavigateUrlFields="manuWebsite" 
                    DataTextField="manufacturer" HeaderText="Manufacturer" SortExpression="manufacturer">
                <ControlStyle CssClass="manufacturer" />
                </asp:HyperLinkField>
                <asp:TemplateField HeaderText="Picture">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("ID","nonLoginDetails.aspx?ID={0}") %>'>
                        <asp:Image src='<%# Eval("picture") %>' ID="Image1" runat="server" CssClass="listPicture" />  
                    </asp:HyperLink>
                </ItemTemplate>                
                    <ControlStyle CssClass="listPicture" />
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <SortedAscendingCellStyle BackColor="#EDF6F6" />
            <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
            <SortedDescendingCellStyle BackColor="#D6DFDF" />
            <SortedDescendingHeaderStyle BackColor="#002876" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SpiritConnString %>" 
            ProviderName="<%$ ConnectionStrings:SpiritConnString.ProviderName %>" 
            SelectCommand="SELECT * FROM [SpirtListByTagView] WHERE ([Tag] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="Tag" QueryStringField="Tag" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
